/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package module3.exercise1;

/**
 *
 * @author trang
 */
public class TestMyPoint {
    public static void changeObject(MyPoint start, MyPoint end){
        start=new MyPoint(10, 10);
        end=new MyPoint(20, 30);
        MyPoint stray;
    }

    public static void main(String[] args) {
        MyPoint start = new MyPoint(10, 10);
       MyPoint end = new MyPoint(20, 30);
       MyPoint stray;
        stray=end;



// Print using the code in book

       // System.out.println("Start point is " + start);
       // System.out.println("End point is " + end);

        //System.out.println("End " + end);
        //System.out.println("Stray " + stray);

/* Print after assigning x,y in stray
   Output look in the Book
 */
        stray.x=47;
        stray.y=50;

        System.out.println("Start point is [" + start.x + "," + start.y + "]");
        System.out.println("End point is [" + end.x + "," + end.y + "]");

        System.out.println("Stray point is [" + stray.x + "," + stray.y + "]");

    }
}
